Integrand size = 29, antiderivative size = 163 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {1}{16} \left (2 a^2+b^2\right ) x-\frac {2 a b \cos (c+d x)}{5 d}+\frac {2 a b \cos ^3(c+d x)}{15 d}-\frac {\left (2 a^2+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (2 a^2-b^2\right ) \cos (c+d x) \sin ^3(c+d x)}{24 d}+\frac {a b \cos (c+d x) \sin ^4(c+d x)}{15 d}+\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \sin (c+d x))^2}{6 d} \]
1/16*(2*a^2+b^2)*x-2/5*a*b*cos(d*x+c)/d+2/15*a*b*cos(d*x+c)^3/d-1/16*(2*a^ 2+b^2)*cos(d*x+c)*sin(d*x+c)/d+1/24*(2*a^2-b^2)*cos(d*x+c)*sin(d*x+c)^3/d+ 1/15*a*b*cos(d*x+c)*sin(d*x+c)^4/d+1/6*cos(d*x+c)*sin(d*x+c)^3*(a+b*sin(d* x+c))^2/d
Time = 0.57 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.74 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {120 a^2 c+60 b^2 c+120 a^2 d x+60 b^2 d x-240 a b \cos (c+d x)-40 a b \cos (3 (c+d x))+24 a b \cos (5 (c+d x))-15 b^2 \sin (2 (c+d x))-30 a^2 \sin (4 (c+d x))-15 b^2 \sin (4 (c+d x))+5 b^2 \sin (6 (c+d x))}{960 d} \]
(120*a^2*c + 60*b^2*c + 120*a^2*d*x + 60*b^2*d*x - 240*a*b*Cos[c + d*x] - 40*a*b*Cos[3*(c + d*x)] + 24*a*b*Cos[5*(c + d*x)] - 15*b^2*Sin[2*(c + d*x) ] - 30*a^2*Sin[4*(c + d*x)] - 15*b^2*Sin[4*(c + d*x)] + 5*b^2*Sin[6*(c + d *x)])/(960*d)
Time = 0.97 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.02, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.552, Rules used = {3042, 3368, 3042, 3529, 3042, 3512, 3042, 3502, 27, 3042, 3227, 3042, 3113, 2009, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^2(c+d x) \cos ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x)^2 \cos (c+d x)^2 (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3368 |
\(\displaystyle \int \sin ^2(c+d x) \left (1-\sin ^2(c+d x)\right ) (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x)^2 \left (1-\sin (c+d x)^2\right ) (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3529 |
\(\displaystyle \frac {1}{6} \int \sin ^2(c+d x) (a+b \sin (c+d x)) \left (-2 a \sin ^2(c+d x)+b \sin (c+d x)+3 a\right )dx+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \int \sin (c+d x)^2 (a+b \sin (c+d x)) \left (-2 a \sin (c+d x)^2+b \sin (c+d x)+3 a\right )dx+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \int \sin ^2(c+d x) \left (15 a^2+12 b \sin (c+d x) a-5 \left (2 a^2-b^2\right ) \sin ^2(c+d x)\right )dx+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \int \sin (c+d x)^2 \left (15 a^2+12 b \sin (c+d x) a-5 \left (2 a^2-b^2\right ) \sin (c+d x)^2\right )dx+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {1}{4} \int 3 \sin ^2(c+d x) \left (5 \left (2 a^2+b^2\right )+16 a b \sin (c+d x)\right )dx+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \int \sin ^2(c+d x) \left (5 \left (2 a^2+b^2\right )+16 a b \sin (c+d x)\right )dx+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \int \sin (c+d x)^2 \left (5 \left (2 a^2+b^2\right )+16 a b \sin (c+d x)\right )dx+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \int \sin ^2(c+d x)dx+16 a b \int \sin ^3(c+d x)dx\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \int \sin (c+d x)^2dx+16 a b \int \sin (c+d x)^3dx\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \int \sin (c+d x)^2dx-\frac {16 a b \int \left (1-\cos ^2(c+d x)\right )d\cos (c+d x)}{d}\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \int \sin (c+d x)^2dx-\frac {16 a b \left (\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)\right )}{d}\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \left (\frac {\int 1dx}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {16 a b \left (\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)\right )}{d}\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (5 \left (2 a^2+b^2\right ) \left (\frac {x}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {16 a b \left (\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)\right )}{d}\right )+\frac {5 \left (2 a^2-b^2\right ) \sin ^3(c+d x) \cos (c+d x)}{4 d}\right )+\frac {2 a b \sin ^4(c+d x) \cos (c+d x)}{5 d}\right )+\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{6 d}\) |
(Cos[c + d*x]*Sin[c + d*x]^3*(a + b*Sin[c + d*x])^2)/(6*d) + ((2*a*b*Cos[c + d*x]*Sin[c + d*x]^4)/(5*d) + ((5*(2*a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x ]^3)/(4*d) + (3*((-16*a*b*(Cos[c + d*x] - Cos[c + d*x]^3/3))/d + 5*(2*a^2 + b^2)*(x/2 - (Cos[c + d*x]*Sin[c + d*x])/(2*d))))/4)/5)/6
3.11.60.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[cos[(e_.) + (f_.)*(x_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^m*(1 - Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, m, n }, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] : > Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x ])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 2) + C*(b*c*m + a*d*( n + 1)) + (A*b*d*(m + n + 2) - C*(a*c - b*d*(m + n + 1)))*Sin[e + f*x] + C* (a*d*m - b*c*(m + 1))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f , A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Time = 0.48 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.72
method | result | size |
parallelrisch | \(\frac {120 a^{2} d x +60 b^{2} d x +5 b^{2} \sin \left (6 d x +6 c \right )+24 a b \cos \left (5 d x +5 c \right )-30 a^{2} \sin \left (4 d x +4 c \right )-15 b^{2} \sin \left (4 d x +4 c \right )-40 a b \cos \left (3 d x +3 c \right )-15 b^{2} \sin \left (2 d x +2 c \right )-240 a b \cos \left (d x +c \right )-256 a b}{960 d}\) | \(117\) |
risch | \(\frac {a^{2} x}{8}+\frac {b^{2} x}{16}-\frac {a b \cos \left (d x +c \right )}{4 d}+\frac {b^{2} \sin \left (6 d x +6 c \right )}{192 d}+\frac {a b \cos \left (5 d x +5 c \right )}{40 d}-\frac {\sin \left (4 d x +4 c \right ) a^{2}}{32 d}-\frac {\sin \left (4 d x +4 c \right ) b^{2}}{64 d}-\frac {a b \cos \left (3 d x +3 c \right )}{24 d}-\frac {b^{2} \sin \left (2 d x +2 c \right )}{64 d}\) | \(127\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )+2 a b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )+b^{2} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) | \(141\) |
default | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )+2 a b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )+b^{2} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) | \(141\) |
norman | \(\frac {\left (\frac {a^{2}}{8}+\frac {b^{2}}{16}\right ) x +\left (\frac {a^{2}}{8}+\frac {b^{2}}{16}\right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {3 a^{2}}{4}+\frac {3 b^{2}}{8}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {3 a^{2}}{4}+\frac {3 b^{2}}{8}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {5 a^{2}}{2}+\frac {5 b^{2}}{4}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15 a^{2}}{8}+\frac {15 b^{2}}{16}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15 a^{2}}{8}+\frac {15 b^{2}}{16}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 a b}{15 d}-\frac {\left (2 a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {\left (2 a^{2}+b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {\left (6 a^{2}+19 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {\left (6 a^{2}+19 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (30 a^{2}-17 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {\left (30 a^{2}-17 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {16 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {16 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {8 a b \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}\) | \(392\) |
1/960*(120*a^2*d*x+60*b^2*d*x+5*b^2*sin(6*d*x+6*c)+24*a*b*cos(5*d*x+5*c)-3 0*a^2*sin(4*d*x+4*c)-15*b^2*sin(4*d*x+4*c)-40*a*b*cos(3*d*x+3*c)-15*b^2*si n(2*d*x+2*c)-240*a*b*cos(d*x+c)-256*a*b)/d
Time = 0.28 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.63 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {96 \, a b \cos \left (d x + c\right )^{5} - 160 \, a b \cos \left (d x + c\right )^{3} + 15 \, {\left (2 \, a^{2} + b^{2}\right )} d x + 5 \, {\left (8 \, b^{2} \cos \left (d x + c\right )^{5} - 2 \, {\left (6 \, a^{2} + 7 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
1/240*(96*a*b*cos(d*x + c)^5 - 160*a*b*cos(d*x + c)^3 + 15*(2*a^2 + b^2)*d *x + 5*(8*b^2*cos(d*x + c)^5 - 2*(6*a^2 + 7*b^2)*cos(d*x + c)^3 + 3*(2*a^2 + b^2)*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (148) = 296\).
Time = 0.35 (sec) , antiderivative size = 309, normalized size of antiderivative = 1.90 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\begin {cases} \frac {a^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {a^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {a^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {2 a b \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {4 a b \cos ^{5}{\left (c + d x \right )}}{15 d} + \frac {b^{2} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {b^{2} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {b^{2} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} - \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} - \frac {b^{2} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right )^{2} \sin ^{2}{\left (c \right )} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((a**2*x*sin(c + d*x)**4/8 + a**2*x*sin(c + d*x)**2*cos(c + d*x)* *2/4 + a**2*x*cos(c + d*x)**4/8 + a**2*sin(c + d*x)**3*cos(c + d*x)/(8*d) - a**2*sin(c + d*x)*cos(c + d*x)**3/(8*d) - 2*a*b*sin(c + d*x)**2*cos(c + d*x)**3/(3*d) - 4*a*b*cos(c + d*x)**5/(15*d) + b**2*x*sin(c + d*x)**6/16 + 3*b**2*x*sin(c + d*x)**4*cos(c + d*x)**2/16 + 3*b**2*x*sin(c + d*x)**2*co s(c + d*x)**4/16 + b**2*x*cos(c + d*x)**6/16 + b**2*sin(c + d*x)**5*cos(c + d*x)/(16*d) - b**2*sin(c + d*x)**3*cos(c + d*x)**3/(6*d) - b**2*sin(c + d*x)*cos(c + d*x)**5/(16*d), Ne(d, 0)), (x*(a + b*sin(c))**2*sin(c)**2*cos (c)**2, True))
Time = 0.19 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.56 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {30 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{2} + 128 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a b - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 12 \, d x - 12 \, c + 3 \, \sin \left (4 \, d x + 4 \, c\right )\right )} b^{2}}{960 \, d} \]
1/960*(30*(4*d*x + 4*c - sin(4*d*x + 4*c))*a^2 + 128*(3*cos(d*x + c)^5 - 5 *cos(d*x + c)^3)*a*b - 5*(4*sin(2*d*x + 2*c)^3 - 12*d*x - 12*c + 3*sin(4*d *x + 4*c))*b^2)/d
Time = 0.42 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.71 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {1}{16} \, {\left (2 \, a^{2} + b^{2}\right )} x + \frac {a b \cos \left (5 \, d x + 5 \, c\right )}{40 \, d} - \frac {a b \cos \left (3 \, d x + 3 \, c\right )}{24 \, d} - \frac {a b \cos \left (d x + c\right )}{4 \, d} + \frac {b^{2} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} - \frac {b^{2} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} - \frac {{\left (2 \, a^{2} + b^{2}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} \]
1/16*(2*a^2 + b^2)*x + 1/40*a*b*cos(5*d*x + 5*c)/d - 1/24*a*b*cos(3*d*x + 3*c)/d - 1/4*a*b*cos(d*x + c)/d + 1/192*b^2*sin(6*d*x + 6*c)/d - 1/64*b^2* sin(2*d*x + 2*c)/d - 1/64*(2*a^2 + b^2)*sin(4*d*x + 4*c)/d
Time = 11.03 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.69 \[ \int \cos ^2(c+d x) \sin ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {\frac {15\,a^2\,\sin \left (4\,c+4\,d\,x\right )}{2}+\frac {15\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4}+\frac {15\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{4}-\frac {5\,b^2\,\sin \left (6\,c+6\,d\,x\right )}{4}+60\,a\,b\,\cos \left (c+d\,x\right )+10\,a\,b\,\cos \left (3\,c+3\,d\,x\right )-6\,a\,b\,\cos \left (5\,c+5\,d\,x\right )-30\,a^2\,d\,x-15\,b^2\,d\,x}{240\,d} \]